package game.common.world;


public class PointImpl implements Point{
	private float 	x,
					y,
					z;

	public PointImpl(Point p) {
		copy(p);
	}
	
	public PointImpl(float x, float y) {
		this.x = x;
		this.y = y;
	}

	public PointImpl(float x, float y, float z) {
		this.x = x;
		this.y = y;
		this.z = z;
	}

	@Override
	public void copy(Point p) {
		this.x = p.getXf();
		this.y = p.getYf();
		this.z = p.getZf();
	}

	public float getXf() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getYf() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public float getZf() {
		return z;
	}

	public void setZ(float z) {
		this.z = z;
	}
	
	public String toString(){
		return new StringBuilder("p(").append(getXf()).append(",").append(getYf()).append(",").append(getZf()).append(")").toString();
	}
}
